<?php ob_start();
    $bedroom = Model_Listing_Residential::getBedroom();
	$internal_lng = $this->listing->getInternalLanguage();
?>
    <?php if (!empty($this->listing->street)) {echo "<dl class='desc'>".$this->dtDd($this->t('Address', $internal_lng), $this->listing->street)."</dl>";}?>
    <?php if (!empty($this->listing->bedroom)) {echo "<dl>".$this->dtDd($this->t('Bedrooms', $internal_lng), $bedroom[$this->listing->bedroom])."</dl>";}?>
    <?php if (!empty($this->listing->size)) {echo "<dl>".$this->dtDd($this->t('Size', $internal_lng), $this->t('__1__ sqft', $internal_lng, number_format((int)$this->listing->size)))."</dl>";}?>
    <?php if (!empty($this->listing->bathroom)) { echo "<dl>".$this->dtDd($this->t('Bathrooms', $internal_lng), $this->listing->bathroom)."</dl>";}?>    
    <?php
    if (!empty($this->listing->building_type)) {
        $views = Model_Listing_Residential::getBuildingType();
        echo "<dl>".$this->dtDd($this->t('Building Type', $internal_lng), $this->t($views[$this->listing->building_type], $internal_lng))."</dl>";
    }
    ?>

    <?php if (!empty($this->listing->building_age)) { echo "<dl>".$this->dtDd($this->t('Building Age', $internal_lng), $this->t('__1__ years', $internal_lng, $this->listing->building_age))."</dl>";}?>    
    <?php if (!empty($this->listing->floor_zone)) { echo "<dl>".$this->dtDd($this->t('Ground Zone', $internal_lng), $this->t($this->listing->floor_zone, $internal_lng))."</dl>";}?>
    <?php
    if (!empty($this->listing->floor_zone)) {
        $views = Model_Listing_Residential::getFloorZone();
        echo "<dl>".$this->dtDd($this->t('Ground Zone', $internal_lng), $this->t($views[$this->listing->floor_zone], $internal_lng))."</dl>";
    }
    ?>

    
    <?php
    if (!empty($this->listing->facilities)) {
        $i          = 0;
        $field      = '';
        $facilities = Model_Listing_Residential::getFacilities();
        $to_add     = '';
        foreach ((array)$this->listing->facilities as $data) {
            $field .= $to_add . $this->t($facilities[$data], $internal_lng);
            $i++;
            $to_add = ', ';
        }
        echo "<dl>".$this->dtDd($this->t('Facilities', $internal_lng), $field)."</dl>";
    }
    ?>
    <?php
    if (!empty($this->listing->views)) {
        $i          = 0;
        $field      = '';
        $views = Model_Listing_Residential::getViews();
        $to_add     = '';
        foreach ((array)$this->listing->views as $data) {
            $field .= $to_add . $this->t($views[$data], $internal_lng);
            $i++;
            $to_add = ', ';
        }
        echo "<dl>".$this->dtDd($this->t('Views', $internal_lng), $field)."</dl>";
    }
    ?>
    <?php
    if (!empty($this->listing->rooms)) {
        $i          = 0;
        $field      = '';
        $views = Model_Listing_Residential::getRooms();
        $to_add     = '';
        foreach ((array)$this->listing->rooms as $data) {
            $field .= $to_add . $this->t($views[$data], $internal_lng);
            $i++;
            $to_add = ', ';
        }
        echo "<dl>".$this->dtDd($this->t('Rooms', $internal_lng), $field)."</dl>";
    }
    ?>
    <?php
    if (!empty($this->listing->outdoor)) {
        $i          = 0;
        $field      = '';
        $views = Model_Listing_Residential::getOutdoor();
        $to_add     = '';
        foreach ((array)$this->listing->outdoor as $data) {
            $field .= $to_add . $this->t($views[$data], $internal_lng);
            $i++;
            $to_add = ', ';
        }
        echo "<dl>".$this->dtDd($this->t('Outdoor', $internal_lng), $field)."</dl>";
    }
    ?>
    <?php
    if (!empty($this->listing->layout)) {
        $i          = 0;
        $field      = '';
        $views = Model_Listing_Residential::getLayout();
        $to_add     = '';
        foreach ((array)$this->listing->layout as $data) {
            $field .= $to_add . $this->t($views[$data], $internal_lng);
            $i++;
            $to_add = ', ';
        }
        echo "<dl>".$this->dtDd($this->t('Layout', $internal_lng), $field)."</dl>";
    }
    ?>
    <?php
    if (!empty($this->listing->conditions)) {
        $i          = 0;
        $field      = '';
        $views = Model_Listing_Residential::getConditions();
        $to_add     = '';
        foreach ((array)$this->listing->conditions as $data) {
            $field .= $to_add . $this->t($views[$data], $internal_lng);
            $i++;
            $to_add = ', ';
        }
        echo "<dl>".$this->dtDd($this->t('Conditions', $internal_lng), $field)."</dl>";
    }
    ?>
    <?php if (!empty($this->listing->other)) { echo "<dl>".$this->dtDd($this->t('Other', $internal_lng), $this->listing->other)."</dl>";}?>
    <?php if (!empty($this->listing->management_fee)) { echo "<dl>".$this->dtDd($this->t('Management Fee', $internal_lng), "HKD ".$this->listing->management_fee)."</dl>";}?>
    <?php if (!empty($this->listing->government_fee)) { echo "<dl>".$this->dtDd($this->t('Government Rate', $internal_lng), "HKD ".$this->listing->government_fee)."</dl>";}?>

<?php $content = trim(ob_get_clean())?>
<?php if (!empty($content)):?>
        <div class="detail category">
            <h2><?php echo $this->t('Property Information', $internal_lng)?></h2>
                <?php echo $content ?>
        </div>
<?php endif;?>